import axios from "axios";
import myAxios from "./myAxios.ts";

const apiAxios = axios.create({
    baseURL: 'https://api.map.baidu.com/',
})
apiAxios.defaults.withCredentials = true;

myAxios.interceptors.response.use(function (response){
    if (response?.data?.code  == 40100){
        window.location.href = '/#/user/login';
    }
    return response;
})

export default apiAxios;